package sample3.provider.dml;

import android.content.ContentResolver;
import android.net.Uri;

/**
 * <pre>
 * ...
 * SqliteDeleteBuilder sql = new SqliteDeleteBuilder(uri);
 * sql.addAndEquals("_id", 10);
 * int delete = sql.delete(getContentResolver());
 * ...
 * </pre>
 */
public class SqliteDeleteBuilder extends AbsDmlBuilder {

	public SqliteDeleteBuilder(Uri uri) {
		super(uri);
	}

	public int delete(ContentResolver contentResolver) {
		String where = null;
		String[] whereArgs = null;

		// WHERE ~ AND ~
		where = getWhere();
		whereArgs = getWhereArgs();
		return contentResolver.delete(mUri, where, whereArgs);
	}
}
